using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SLINDEXERMap : EntityTypeConfiguration<SLINDEXER>
    {
        public SLINDEXERMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.TITLE)
                .HasMaxLength(35);

            this.Property(t => t.SOURCE)
                .HasMaxLength(35);

            this.Property(t => t.NOTE)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("SLINDEXER");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.DATE).HasColumnName("DATE");
            this.Property(t => t.TITLE).HasColumnName("TITLE");
            this.Property(t => t.SOURCE).HasColumnName("SOURCE");
            this.Property(t => t.NOTE).HasColumnName("NOTE");
        }
    }
}
